.anime-wrapper {
  text-align: left;
  margin: 2rem 5rem;

  .video-player-wrapper {
    display: grid;
    grid-template-columns: 70% calc(30% - 1rem);
    gap: 1rem;
    align-items: flex-start;

    .video-header {
      display: flex;
      justify-content: space-between;
      background-color: #f1f2f3;
      opacity: 0.9;
      padding: 0.5rem 1rem;
      border-radius: 0.5rem 0.5rem 0 0;
      margin-top: 1rem;
      font-weight: 400;
      color: #222;

      .danmu-input {
        color: #fff;
        display: inline-block;
        position: relative;
        height: 30px;
        width: 30%;
        text-align: right;
        vertical-align: middle;
        background: #fff;
        border: 1px solid #f1f2f3;
        border-radius: 18px;

        input {
          width: 100%;
          height: 30px;
          box-sizing: border-box;
          background-color: initial;
          border: none;
          font-size: 12px;
          letter-spacing: 0;
          padding: 9px 60px 9px 12px;
          position: absolute;
          left: 0;
          outline: 0;
        }

        button {
          background-color: rgb(0, 174, 236);
          border-radius: 0 16px 16px 0;
          width: 60px;
          height: 30px;
          line-height: 30px;
          position: relative;
          right: 0;
          border: none;
          color: #fff;
          vertical-align: top;
          font-weight: 400;
          cursor: pointer;
          font-size: 13px;
          outline: 0;
        }
      }
    }

    .iframe-player {
      position: relative;
      padding-bottom: 56.25%;
      height: 0;
      overflow: hidden;
      border-radius: 0 0 0.625rem 0.625rem;

      iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
      }
    }

    .episodes-wrapper {
      margin-top: 1rem;
      background-color: #f1f2f3;
      border-radius: 0.4rem;
      padding: 1rem;

      .episodes-title {
        display: flex;
        flex-direction: row;
        align-items: center;
        height: 44px;
        user-select: none;
        h4 {
          padding: 0;
          font-size: 16px;
          overflow: hidden;
          white-space: nowrap;
        }
        span {
          font-size: 12px;
          color: #61666d;
        }
      }

      .episodes {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(4rem, 1fr));
        gap: 0.8rem;
        grid-row-gap: 1rem;
        justify-content: space-between;
        margin-top: 1rem;

        .episode-link {
          text-align: center;
          color: #222;
          text-overflow: ellipsis;
          text-decoration: none;
          background-color: #fff;
          padding: 0.6rem 0.8rem;
          font-weight: 400;
          border-radius: 0.3rem;
          transform: 0.2s;
          border: 1px solid transparent;
          &:hover {
            background-color: #dff6fd;
            border: 1px solid #00aeec;
          }
        }
      }
    }
  }
}

@media (max-width: 768px) {
  .anime-wrapper {
    margin: 1rem;

    .video-player-wrapper {
      grid-template-columns: auto;

      .episodes-wrapper {
        margin-top: 0;
      }
    }

    .episodes {
      grid-template-columns: repeat(auto-fit, minmax(3rem, 1fr));
    }
  }
}
